package main

import (
	"net/http"
	_ "net/http/pprof"

	pkgApp "sieve_admin_server_userpass/app"
	"sieve_admin_server_userpass/app/server"
	"sieve_admin_server_userpass/lib/log"
	_ "sieve_admin_server_userpass/lib/log/filelog"

	"sieve_admin_server_userpass/lib/app"
)

func init() {
	app.OnStart(func() {
		log.Info(pkgApp.InitApp())
	})
}

func main() {
	app.Start()
	http.HandleFunc("/debug/db/", pkgApp.HandleStats)
	http.HandleFunc("/exclude/", pkgApp.HandleExclude)
	// server.LogIn(pkgApp.Login)
	// server.LogOut(pkgApp.Logout)
	if err := server.Run(); err != nil {
		log.Err(err)
	}
}
